<template>
	<div>
			<el-form-item v-if="$check_register_field('add','user_name','/develop_users/view')" label="用户姓名" prop="user_name">
				<el-input id="user_name" v-model="form['user_name']" placeholder="请输入用户姓名" ></el-input>
				</el-form-item>
				<el-form-item v-if="$check_register_field('add','user_gender','/develop_users/view')" label="用户性别" prop="user_gender">
				<el-select id="user_gender" v-model="form['user_gender']">
			<el-option v-for="o in list_user_gender" :key="o" :label="o" :value="o">
			</el-option>
		</el-select>
				</el-form-item>
				<el-form-item v-if="$check_register_field('add','user_age','/develop_users/view')" label="用户年龄" prop="user_age">
				<el-input-number id="user_age" v-model.number="form['user_age']"></el-input-number>
				</el-form-item>
				<el-form-item v-if="$check_register_field('add','users_mobile_phone','/develop_users/view')" label="用户手机" prop="users_mobile_phone">
				<el-input id="users_mobile_phone" v-model="form['users_mobile_phone']" placeholder="请输入用户手机" type="tel">
		</el-input>
				</el-form-item>
	
	</div>
</template>

<script>
	import mixin from "@/mixins/component.js";

	export default {
		mixins: [mixin],
		props:{

			form:{
				type: Object,
				default: function(){
					return {
							"user_name":  '' ,
								"user_gender":  '' ,
								"user_age":  0 ,
								"users_mobile_phone":  '' ,
						}
				}
			},

		},
		data() {
			return {
				field: "develop_users_id",
				url_add: "~/api/develop_users/add?",
				url_set: "~/api/develop_users/set?",
				url_upload: "~/api/develop_users/upload?",

									list_user_gender: ['男','女'],
										rules: {
					"user_name": [    {required: true,message: '用户姓名不能为空'},  ],
					"user_gender": [    {required: true,message: '用户性别不能为空'},  ],
					"user_age": [     {type: 'number',required: true,message: '用户年龄不能为空'},  ],
					"users_mobile_phone": [   {validator: this.$is_phone,trigger: 'blur'},   {required: true,message: '用户手机不能为空'},  ],
				}

			}
		},
		methods: {
	
	
		
	
		
	
		
	
			},
		created() {
										}
	}
</script>
